/*
 * CmdManager.h
 *
 *  Created on: 23.10.2011
 *      Author: niea
 */

#ifndef CMDMANAGER_H_
#define CMDMANAGER_H_

#include <vector>
#include <string>

#include "ChatClient.h"
#include "SocketTCP.h"

void sigHandler(int sigNum);

class CmdManager {
public:
	CmdManager();
	virtual ~CmdManager();
	int mainLoop();
	void onSignal();

private:
	std::vector<std::pair<std::string, std::string> > m_cmd_list;
	ChatClient m_chat_client;
	SocketTCP m_tcp_socket;

	std::pair<std::string, std::string> readCmd();
	void printCmdList() const;
};

#endif /* CMDMANAGER_H_ */
